<?php

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
#	FILE:			includes/show_thumbnail.php
#	FUNCTION:		Page that dynamically generates a thumbnail for an image
#	AUTHOR:			Cameron Morrow
#	CREATED:		09/09/2005
#
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# Include
include "../includes/files.php";

# Get required image
$base_image = (@$_GET["image"]) ? $_GET["image"] : false;

# If an image was supplied
if ($base_image) {

	# Output
	header("content-type: image/jpeg");

	# Create image
	createThumbnail("../assets/uploads/", $base_image, true);

} else {

	# Redirect to fake image
	header("location: ../assets/images/unknown_thumbnail.jpg");
}

?>